<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('简历拆分和获取')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-resume-add">
            <button type="button" class="btn btn-sm btn-primary" onclick="BreakUpResume()"><i class="fa fa-check"></i>拆分简历</button>&nbsp;
            <button type="button" class="btn btn-sm btn-primary" onclick="getResumeNewList()"><i class="fa fa-check"></i>简历描述获取</button>&nbsp;
            <div class="form-group">
                <div class="col-xs-10">
                    <textarea id="remark" name="remark" maxlength="14450" class="form-control" wrap="off" rows="10"></textarea>
                </div>
            </div>
        </form>
        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table"></table>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "system/resume"
        $("#form-resume-add").validate({
            focusCleanup: true
        });
        var userId= [[${userId}]];//用户编号


        $(function() {

            getReseumeList();
        });


        function BreakUpResume() {
            $.ajax({
                url:prefix+'/formtFwb',
                type:'post',
                dataType:'json',
                data:{a1701:$.trim($("#remark").val())},
                async:false,
                success:function (res) {
                    if(res.code==0){
                        getReseumeList()
                    }

                }
            })
        }



        function getReseumeList() {
            var options = {
                url: prefix + "/list?id="+userId,
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "简历拆分测试",
                columns: [{
                    checkbox: true
                },
                    {
                        field: 'id',
                        title: '序号',
                        visible: false
                    },
                    {
                        field: 'sid',
                        title: '用户编号'
                    },
                    {
                        field: 'startTime',
                        title: '起始时间'
                    },
                    {
                        field: 'endTime',
                        title: '结束时间'
                    },
                    {
                        field: 'duities',
                        title: '职务'
                    },
                 ]
            };
            $.table.init(options);
        }



        function getResumeNewList() {
            $.ajax({
                url:prefix+'/getJianLiData',
                type:'post',
                dataType:'json',
                data:{sid:userId},
                async:false,
                success:function (res) {
                    if(res.code==0){
                     $("#remark").val(res.data)
                    }

                }
            })
        }
    </script>
</body>
</html>